# Contributor: Hannes Braun <hannes@hannesbraun.net>
# Maintainer: Hannes Braun <hannes@hannesbraun.net>
pkgname=libscfg
pkgver=0.1.1
pkgrel=0
pkgdesc="C library for scfg"
url="https://sr.ht/~emersion/libscfg"
arch="all"
license="MIT"
makedepends="meson"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/libscfg/archive/v$pkgver.tar.gz
	set-so-version.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

sha512sums="
8f4821d22cd26509c40d77d2a5585fb891259618aeb03611b5f2e3b620a88b7f24cc9bf05b6ad3f99c3c35f855e2ba8a1df13460ff2fe53152d78d03fd8dd6ce  libscfg-0.1.1.tar.gz
6c4b47c04f25e65e3a3f0c6ab589b46b99fcc50280adc0e30a38cbdfcfd627d420c69e8b53080ee13c3ed3cb2938e7fe1652dd2108ce1ca41143f3c6ec69f85e  set-so-version.patch
"
